" 行号
set nu

" 换行
set wrap

" ================ 缩进 ================
" 默认缩进4个空格
set shiftwidth=4

" 使用tab时空格数
set softtabstop=4

" tab代表4个空格
set tabstop=4

" 使用空格替换tab
set expandtab

" 自动缩进
set autoindent
set smartindent

" ================ 显示 ================
" 总是显示状态行
set laststatus=1

" 颜色模式
colorscheme default

" 语法高亮
syn on

" 高亮显示行
set cursorline
set cursorcolumn
highlight CursorColumn cterm=NONE ctermbg=black ctermfg=green guibg=NONE guifg=NONE

" 文件类型
filetype on

" Highlight search
set incsearch           " incremental search mode
set hlsearch            " highlight search things
set ignorecase          " ignore case when searching
set smartcase           " only works when ignorecase on

" encoding
set encoding=utf-8
set fileencodings=utf-8,latin-1,chinese

" ================ 功能 ================
" backspace键 ；indent 删除自动缩进的值；eol 删除上一行行末尾的回车，两行合并；start 除了刚输入的，还删除原来的字符
set backspace=indent,eol,start

" Don't create .swp files
set noswapfile

" Show dots for invisible hidden spaces (use blank spaces for tabs)
set list listchars=tab:\ \ ,trail:·

" Show possibilties when pressing tab
set wildmenu

" 粘贴模式切换按键
set pastetoggle=<F9>
